﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using GameLogic.ImagesClasses;

namespace GameLogic
{
    class PictureManager
    {
        private static Dictionary<int, Image> images;

        private static void Init()
        {
            images[(int)ImageKind.BRICK] = new Bitmap(Images.brick_texture700, Constants.CELL_SIZE, Constants.CELL_SIZE);

            images[(int)ImageKind.PLAYER_EAST] = new Bitmap(Images.PLAYER_EAST, Constants.TANK_WIDTH, Constants.TANK_HEIGHT);
            images[(int)ImageKind.PLAYER_WEST] = new Bitmap(Images.PLAYER_WEST, Constants.TANK_WIDTH, Constants.TANK_HEIGHT);
            images[(int)ImageKind.PLAYER_SOUTH] = new Bitmap(Images.PLAYER_SOUTH, Constants.TANK_HEIGHT, Constants.TANK_WIDTH);
            images[(int)ImageKind.PLAYER_NORTH] = new Bitmap(Images.PLAYER_NORTH,  Constants.TANK_HEIGHT,Constants.TANK_WIDTH);

            images[(int)ImageKind.TANK_EAST] = new Bitmap(Images.TANK_EAST, Constants.TANK_WIDTH, Constants.TANK_HEIGHT);
            images[(int)ImageKind.TANK_WEST] = new Bitmap(Images.TANK_WEST, Constants.TANK_WIDTH, Constants.TANK_HEIGHT);
            images[(int)ImageKind.TANK_SOUTH] = new Bitmap(Images.TANK_SOUTH, Constants.TANK_HEIGHT, Constants.TANK_WIDTH);
            images[(int)ImageKind.TANK_NORTH] = new Bitmap(Images.TANK_NORTH,  Constants.TANK_HEIGHT, Constants.TANK_WIDTH);

            images[(int)ImageKind.BULLET_EAST] = new Bitmap(Images.BULLET_EAST, Constants.BULLET_SIZE, Constants.BULLET_SIZE);
            images[(int)ImageKind.BULLET_WEST] = new Bitmap(Images.BULLET_WEST, Constants.BULLET_SIZE, Constants.BULLET_SIZE);
            images[(int)ImageKind.BULLET_SOUTH] = new Bitmap(Images.BULLET_SOUTH, Constants.BULLET_SIZE, Constants.BULLET_SIZE);
            images[(int)ImageKind.BULLET_NORTH] = new Bitmap(Images.BULLET_NORTH, Constants.BULLET_SIZE, Constants.BULLET_SIZE);
        }

        static PictureManager()
        {
            images = new Dictionary<int, Image>();
            Init();
        }

        public static Image GetImage(ImageKind kind)
        {
            return images[(int)kind];
        }

        private PictureManager()
        {

        }
    }
}
